package com.shouhuobao.take.model;

import com.shouhuobao.take.weight.indexbar.CharacterParser;

import java.io.Serializable;

/**
 * Created by joker on 2017/7/13.
 */

public class ContactPeopleBean implements Serializable {
    public static final int TYPE_CHARACTER = 0;
    public static final int TYPE_DATA = 1;
    public String item_en;
    private String id;
    private String phone;
    private Integer stationId;
    public int item_type;
    public String name;

    public ContactPeopleBean() {
    }

    public ContactPeopleBean(String name, int type) {
        CharacterParser parser = CharacterParser.getInstance();
        this.name = name;
        this.item_type = type;
        this.item_en = parser.getSelling(name).toUpperCase().trim();
        if (!item_en.matches("[A-Z]+")) {
            item_en = "#" + item_en;
        }
    }

    public ContactPeopleBean(String id, String name, String phone, Integer stationId, int type) {
        CharacterParser parser = CharacterParser.getInstance();
        this.id = id;
        this.name = name;
        this.phone = phone;
        this.stationId = stationId;
        this.item_type = type;
        this.item_en = parser.getSelling(name).toUpperCase().trim();
        if (!item_en.matches("[A-Z]+")) {
            item_en = "#" + item_en;
        }
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getStationId() {
        return stationId;
    }

    public void setStationId(Integer stationId) {
        this.stationId = stationId;
    }

    public int getItem_type() {
        return item_type;
    }

    public void setItem_type(int item_type) {
        this.item_type = item_type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getItem_en() {
        return item_en;
    }

    public void setItem_en(String item_en) {
        this.item_en = item_en;
    }
}
